package com.jxsr.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Description :
 * @Author : Bruce Lee
 * @CreateTime : 2024/12/17
 */

@ControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(value = LimitationException.class)
    @ResponseBody
    public String handlerException(LimitationException e, LimitationException limitationException){
        return limitationException.getMessage();
    }

}
